﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Jxym.wlkc2011.Module.Default.model;
using Jxym.DBUtility;
using Newtonsoft.Json;

namespace Jxym.wlkc2011.Module.Default.SERVER.User
{
    public partial class DutiesList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                MsSqlDal<Duties> iD = new MsSqlDal<Duties>();

                IList<Duties> list = iD.GetList("", null, "", 0);

                string str = "[";

                foreach (Duties d in list)
                {
                    str += JsonConvert.SerializeObject(d) + ",";
                }

                Response.Write(str.TrimEnd(',') + "]");
            }
        }
    }
}